home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / CBGRX103.ZIP / contrib / libgrx / src / fakeclip.h < prev    next >
Text File  |  1993-12-06  |  2KB  |  87 lines

  1. /** 
  2.  ** FAKECLIP.H 
  3.  **
  4.  **  Copyright (C) 1992, Csaba Biegl
  5.  **    820 Stirrup Dr, Nashville, TN, 37221
  6.  **    csaba@vuse.vanderbilt.edu
  7.  **
  8.  **  This file is distributed under the terms listed in the document
  9.  **  "copying.cb", available from the author at the address above.
  10.  **  A copy of "copying.cb" should accompany this file; if not, a copy
  11.  **  should be available from where this file was obtained.  This file
  12.  **  may not be distributed without a verbatim copy of "copying.cb".
  13.  **  You should also have received a copy of the GNU General Public
  14.  **  License along with this program (it is in the file "copying");
  15.  **  if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  16.  **  Cambridge, MA 02139, USA.
  17.  **
  18.  **  This program is distributed in the hope that it will be useful,
  19.  **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  **  GNU General Public License for more details.
  22.  **/
  23.  
  24. #ifndef _CLIPPING_H_
  25. #define _CLIPPING_H_
  26.  
  27. #define INSIDE        0
  28. #define CLIPPED        1
  29. #define OUTSIDE        2
  30.  
  31. #ifndef WHEN_CLIPPED
  32. #define WHEN_CLIPPED
  33. #endif
  34.  
  35. #ifndef WHEN_OUTSIDE
  36. #define WHEN_OUTSIDE
  37. #endif
  38.  
  39. #define CLIPDOT(c,xx,yy)
  40.  
  41. #define CLIPDOTTOCONTEXT(c,xx,yy)
  42.  
  43. #define CLIPHLINE(c,x1,x2,yy) {                        \
  44.     if(x1 > x2) EXCHG(x1,x2);                        \
  45. }
  46.  
  47. #define CLIPVLINE(c,xx,y1,y2) {                        \
  48.     if(y1 > y2) EXCHG(y1,y2);                        \
  49. }
  50.  
  51. #define CLIPBOX(c,x1,y1,x2,y2) {                    \
  52.     if(x1 > x2) EXCHG(x1,x2);                        \
  53.     if(y1 > y2) EXCHG(y1,y2);                        \
  54. }
  55.  
  56. #define CLIPSORTEDBOX(c,x1,y1,x2,y2)
  57.  
  58. #define CLIPBOXTOCONTEXT(c,x1,y1,x2,y2) {                \
  59.     if(x1 > x2) EXCHG(x1,x2);                        \
  60.     if(y1 > y2) EXCHG(y1,y2);                        \
  61. }
  62.  
  63. #define CLIPLINE(c,x1,y1,x2,y2) {                    \
  64.     if(x1 > x2) { EXCHG(x1,x2); EXCHG(y1,y2); }                \
  65. }
  66.  
  67. #undef  MOUSE_FLAG
  68. #undef  MOUSE_BLOCK
  69. #undef  MOUSE_UNBLOCK
  70.  
  71. #define MOUSE_FLAG
  72. #define MOUSE_BLOCK(cxt,x1,y1,x2,y2)
  73. #define MOUSE_UNBLOCK()
  74.  
  75.  
  76. #define GrPlot          GrPlotNC
  77. #define GrLine          GrLineNC
  78. #define GrHLine          GrHLineNC
  79. #define GrVLine          GrVLineNC
  80. #define GrBox          GrBoxNC
  81. #define GrFilledBox   GrFilledBoxNC
  82. #define GrFramedBox   GrFramedBoxNC
  83. #define GrPixel          GrPixelNC
  84.  
  85. #endif /* whole file */
  86.  
  87.